package com.hotel.mapper;

import com.hotel.pojo.Orders;
import com.hotel.pojo.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface OrdersMapper {

    @Select("select count(1) from orders where user_name=#{userName}")
    Long getTotal(String userName);

    List<Orders> orderListByPage(@Param("start") int start,
                                 @Param("size")int size,
                                 @Param("query")String query,
                                 @Param("userName")String userName);

    @Delete("delete from orders where orders_id = #{ordersId}")
    void deleteOrders(Integer ordersId);

    void addOrders(Integer id);

    void updateStatus(Integer ordersId);

    @Delete("delete from temporary where id = #{id}")
    void deleteTemporary(Integer id);
}
